// 封装三个方法来操作搜索记录
const key = 'search_history'

export const setHistory = (history) => {
  localStorage.setItem(key, JSON.stringify(history))
}
export const getHistory = () => {
  return JSON.parse(localStorage.getItem(key))
}
export const clearHistory = () => {
  localStorage.removeItem(key)
}
